home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Herois / Codigo.Cst / 00206_Script_MM Tools < prev    next >
Text File  |  1999-03-19  |  3KB  |  114 lines

  1. on melhoresEmbaralha
  2.   global gMelhoresTabela, gNumMelhores
  3.   set gMelhoresTabela = [ 2000, 2001, 2002, 2003, 2004, 2005,¼
  4.                           2006, 2007, 2008 ]
  5.   set gNumMelhores = 1
  6.   repeat with i = 1 to 9
  7.     set j = random(9)
  8.     if j <> i then
  9.       set tmp = getAt(gMelhoresTabela,i)
  10.       setAt(gMelhoresTabela, i, getAt(gMelhoresTabela,j))
  11.       setAt(gMelhoresTabela, j, tmp)
  12.     end if
  13.   end repeat
  14. end
  15.  
  16.  
  17. on vaiMelhores arqNum
  18.   if arqNum = 0 then
  19.     go frame "Melhores Momentos"
  20.   else
  21.     set arqNum = 2005
  22.     -- Empilha pagina visitada
  23.     empilhaArq arqNum
  24.     
  25.     case arqNum of
  26.       2000: go frame "Marvel"
  27.       2001: go frame "Missao"
  28.       2002: go frame "JQuest"
  29.       2003: go frame "Japas"
  30.       2004: go frame "ArquivosX"
  31.       2005: go frame "Phantom"
  32.       2006: go frame "Hades"
  33.       2007: go frame "Jurassic"
  34.       2008: go frame "Hercules"
  35.     end case
  36.     sendAllSprites(#stopBola)
  37.     global gDonde
  38.     if gDonde <> 2000 then
  39.       sendAllSprites(#bolaAleatoria)
  40.     end if
  41.     sendSprite(120, #comecaAnima)
  42.     updateStage
  43.     
  44.     -- Inicializa links
  45.     global gLinks
  46.     global gLinksCount, gLinksTable, gLinksDest, gLinksTitle
  47.     mSetCriteria(gLinks,"arqNum","=",arqNum)
  48.     mSelect(gLinks)
  49.     set gLinksCount = mSelectCount(gLinks)
  50.     set gLinksTable = []
  51.     set gLinksDest = []
  52.     set gLinksTitle = []
  53.     
  54.     if gLinksCount > 0 then
  55.       set links = gLinksCount
  56.       set gLinksCount = 0
  57.       repeat with i = 1 to links
  58.         
  59.         sendSprite(120,#idleClaquete)
  60.         
  61.         -- Le registro de link
  62.         set mNum = mGetField(gLinks, "mediaNum")
  63.         set sNum = mGetField(gLinks, "subtitNum")
  64.         set pNum = mGetField(gLinks, "palNum")
  65.         set destArq = mGetField(gLinks,"destArq")        
  66.         
  67.         -- Coloca registro na tabela
  68.         set tmp = String(mNum) & "," & String(sNum) & "," &¼
  69.                   String(pNum)
  70.         add gLinksTable, tmp
  71.         add gLinksDest, destArq
  72.         mGoNext(gLinks)
  73.         
  74.       end repeat    
  75.     end if
  76.     
  77.     sendSprite(120,#finalizaAnima)
  78.     updateStage
  79.   end if
  80. end 
  81.  
  82. on MMVaiFotos frm, pulo, sprIni, sprFim
  83.   sendSprite(120, #comecaAnima)
  84.   updateStage
  85.   
  86.   global gPronde
  87.   set gPronde = 2000
  88.   sendAllSprites(#cleanSprite)
  89.   go frame frm
  90.   sendAllSprites(#continueBola)
  91.   
  92.   if pulo <> 0 then 
  93.     repeat with i = sprIni to sprFim
  94.       sendSprite(i, #moveRel, pulo)
  95.     end repeat
  96.   end if
  97.   
  98.   sendSprite(120, #finalizaAnima)
  99.   updateStage
  100. end
  101.  
  102. on MMVaiFotosLimitado frm, n
  103.   sendSprite(120, #comecaAnima)
  104.   updateStage
  105.   
  106.   global gPronde
  107.   set gPronde = 2000
  108.   sendAllSprites(#cleanSprite)
  109.   go marker(frm & String(n))
  110.   sendAllSprites(#continueBola)
  111.   
  112.   sendSprite(120, #finalizaAnima)
  113.   updateStage
  114. end